html {
    font-size: 10px;
}

/* iphone se */
@media only screen and (min-width: 320px){
    html {
        font-size: 6px!important;
    }
}

/* iphone 4.7 */
@media only screen and (min-width: 370px){
    html {
        font-size: 7px!important;
    }
}

/* iphone 5.5 */
@media only screen and (min-width: 410px){
    html {
        font-size: 8px!important;
    }
}

/*
* chrome 浏览器最小支持的是font-size:12px
* 所以设置成10px chrome浏览器就存在BUG
* 但是safari上面不存在问题
* 这个问题暂时不解决，有空再改
*
*/
/* computer: > 1366*768*/
@media only screen and (min-width: 420px){
    html {
        font-size: 10px!important;
    }
}

body{
    margin: 0;
    background: #bcbeb3;
    font-family: "Source Han Sans", "PingHei","Helvetica Neue","Helvetica","Microsoft Yahei","STHeitiSC-Light","Arial",sans-serif, Verdana,"Lantinghei SC","Hiragino Sans GB",arial;
}

body[layout=phone] {
    background: url("../img/app-background.jpg") no-repeat;
    /*background: #c0c2b7;*/
    background-size: cover;
}

.status_bar {
    position: inherit;
    background: rgba(256, 256, 256, .92);
    width: 100%;
    height: 4rem;
    font-size: 2rem;
    line-height: 4rem;
    border: 0;
    padding: 0;
}

.status_bar[layout=phone] {
    height: 0;
    display: none;
    visibility: collapse;
}

.status_bar_content {
    min-width: 32rem;
    max-width: 90rem;
    margin: 0 auto;
}

.status_bar_content > .info {
    margin: 0 1.5rem;
    float: left;
}

.status_bar_content > .divider {
    margin: 1rem 0;
    height: 2rem;
    width: 0.1rem;
    background: #979797;
    float: right;
}

.status_bar_content > .exit {
    margin: 0 1rem;
    float: right;
}

.status_bar_content > .state {
    margin: 0 1.5rem 0 0;
    float: right;
}

#user_name, #user_state {
    color: #43B030;;
}

.content {
    min-width: 32rem;
    max-width: 90rem;
    margin: 0 auto;
}

.panel {
    background: rgba(256, 256, 256, .8);
    margin: 2.5rem 1rem 5rem 1rem;
    float: left;
    text-align: center;
}

.panel[layout=phone] {
    background: rgba(256, 256, 256, .7);
    margin: 0;
    width: 100%;
    float: left;
    text-align: center;
}

.header {
    background: rgba(256, 256, 256, .75);
    padding-top: 3.6rem;
    padding-left: 3.5rem;
    padding-right: 2rem;
    height: 10rem;
    text-align: left;
}

.header[layout=phone] {
    background: rgb(256, 256, 256);
    padding-top: 2rem;
    padding-left: 2rem;
    padding-right: 1rem;
    height: 9rem;
    text-align: left;
}

.family {
    float: left;
}

#family_name {
    opacity: 0.9;
    margin: 0 0 1rem 0;
    font-size: 4rem;
    line-height: 4.4rem;
    font-weight: normal;
}

.header[layout=phone] > .family > #family_name {
    font-weight: normal;
    font-size: 3.2rem;
    line-height: 3.8rem;
}

#family_message {
    opacity: 0.9;
    color: #43B030;
    padding: 0 1.2rem 0 1.2rem;
    margin: 0;
    font-size: 1.4rem;
    line-height: 2.6rem;
    font-weight: normal;
    background: #E6E6E6;
    border-radius: 0.6rem;
}

#family_message[type=error] {
    color: #ff0000;
}

.member {
    float: right;
}

.member > .member_icon {
    height: 6.5rem;
    width: 6.5rem;
    float: right;
    border-radius: 3rem;
    margin-top: 0.5rem;
    margin-right: 1rem;
}

.member > .exit_icon {
    height: 4rem;
    width: 4rem;
    float: right;
    margin-top: 2rem;
}

.member[layout=display] {
    display: none;
    visibility: collapse;
}


.device_control {
    float: left;
    padding-left: 3.5rem;
}

.device_control > .service_type {
    opacity: 0.65;
    margin: 1rem 0 1rem 0;
    padding-left: 0.6rem;
    text-align: left;
    font-size: 1.6rem;
    clear: both;
}

.service_list {
    margin: 0;
    text-decoration: none;
    padding-left: 0;
    float: left;
}

.service_list > li  {
    text-align: left;
    display: inline;
    margin: 0 1.6rem 2rem 0;
    float: left;
}

.service_cell {
    background: #FFFFFF;
    width: 11.5rem;
    height: 11.5rem;
    border-radius: 1.5rem;
    padding: 1.3rem;
    cursor: pointer;
}

[state=close], [state=offline] {
    background: #DEDEDE;
}

.service_cell > img {
    height: 7rem;
    width: 7rem;
}

.service_cell > .description {
    font-size: 1.6rem;
    line-height: 2.5rem;
    margin: 0;
    padding: 0 0 0 0.2rem;
    opacity: 0.75;
}

[state=offline] > .description {
    opacity: 0.45;
}

.service_cell > .description > .minor {
    margin-left: 0.6rem;
}

.service_cell > .state {
    opacity: 0.75;
    line-height: 2.5rem;
    margin: 0;
    padding: 0 0 0 0.2rem;
    font-size: 1.6rem;
}

[state=offline] > .state{
    color: #e47879;
}

[state=close] > .state {
    color: #F73A3A;
}

[state=online] > .state {
    color: #4CB739;
}


.trademark {
    background: rgba(256, 256, 256, .6);
    margin-top: 20rem;
    height: 7.5rem;
    text-align: center;
    float: left;
    padding-top: 3rem;
    width: 100%;
}

.trademark[layout=phone] {
    background: rgba(256, 256, 256, .8);
    margin-top: 18rem;
    padding-top: 1.6rem;
    height: 6.8rem;
}

.trademark > img{
    height: 4.4rem;
}

@keyframes clockwise_rotate{
    0% {
        -webkit-transform: rotate(0deg);
        -moz-transform: rotate(0deg);
        -ms-transform: rotate(0deg);
        -o-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(-360deg);
        -moz-transform: rotate(-360deg);
        -ms-transform: rotate(-360deg);
        -o-transform: rotate(-360deg);
        transform: rotate(-360deg);
    }
}

/* 打开的风扇要转动*/
[icon_t=fan][state=open] > img{
    animation: clockwise_rotate 2s linear infinite;
}

